Skip to content

SEA: Reduce network calls for synchronous commands #633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 19, 2025

Conversation

varun-edachali-dbx
Copy link
Collaborator

What type of PR is this?

  • Refactor

Description

In execute_command we first send the execute request to the server, following which, if the request is synchronous, we poll for the request state until it is no longer in the pending state. Following this, we make an additional GET request to the server to get the final request information. There are two areas of improvement:

  • if the request is small and completes execution (i.e., reaches the SUCCEEDED state) within the wait_timeout, then we need not poll for completion or make another GET request to the server. We can immediately construct our ResultSet with the provided response.
  • While we poll for the request state, if the state reaches SUCCEEDED then the response is accompanied by the response data that we need to construct the ResultSet. We need not make another GET request to the server after we are done polling and can instead utilise the last response provided.

How is this tested?

  • Unit tests
  • E2E Tests
  • Manually
  • N/A

Related Tickets & Documents

N/A

@varun-edachali-dbx varun-edachali-dbx marked this pull request as ready for review July 10, 2025 02:12
Copy link
Contributor

@jayantsing-db jayantsing-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions inline.

@varun-edachali-dbx varun-edachali-dbx merged commit 8fbca9d into sea-migration Jul 19, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants